<?php
   class userController extends platformController{
	   //有关用户的控制器
	   //用户列表
	   public function userAction(){
		   $model=new userModel;
		   $rs=$model->getAll();
		   if(!empty($_POST['button'])){
				$rrs=$model->selectAll();
		   }
		   require CURRENT_VIEW_PATH."news_user.html";
	   }
	   //删除用户的方法
	   public function deleteAction(){
		   $model=new userModel;
		   if(!isset($_GET['id'])){
			   return;
		   }
		   if($rs=$model->delete()){
			   $this->jump("index.php?p=admin&c=user&a=user");
		   }else{
			   echo "<script>alert('删除失败');history.back();</script>";
		   }
	   }
	   //查看用户详细信息的方法
	   public function dataAction(){
		   $model=new userModel;
		   
		   $rs=$model->data();
		   require CURRENT_VIEW_PATH."news_user_data.html";
	   }
   }
?>